<template>
  <el-tag :type="value === yesValue ? yesType : noType" disable-transitions>{{
    value === yesValue ? yesText : noText
  }}</el-tag>
</template>

<script>
export default {
  name: 'YesNoTag',
  props: {
    value: {
      type: String,
      required: true
    },
    yesValue: {
      type: String,
      required: false,
      default: () => 'Y'
    },
    yesText: {
      type: String,
      required: false,
      default: () => '是'
    },
    noText: {
      type: String,
      required: false,
      default: () => '否'
    },
    yesType: {
      type: String,
      required: false,
      default: () => 'success'
    },
    noType: {
      type: String,
      required: false,
      default: () => 'danger'
    }
  }
}
</script>
